from extension.wrapper.test import parser


def cli_export_config_local_sub(self):
    # 导出配置文件到/tmp目录
    cmd_str = "ipmcget -t config -d export -v /tmp/config.json"
    cmd = cmd_str.split(" ")
    return [{"cmdline": cmd, "parser": parser.parse_export_config_info}]

def cli_set_position_light_force(self):
    # 设置定位灯状态
    cmd_str = f"ipmcset -d identify -v force"
    cmd = cmd_str.split(" ")
    return [{"cmdline": cmd, "parser": parser.parse_set_position_light_info}]

def cli_set_position_light_sparkle(self):
    # 设置定位灯状态
    cmd_str = f"ipmcset -d identify -v 15"
    cmd = cmd_str.split(" ")
    return [{"cmdline": cmd, "parser": parser.parse_set_position_light_info}]

def cli_set_position_light_off(self):
    # 设置定位灯状态
    cmd_str = f"ipmcset -d identify -v 0"
    cmd = cmd_str.split(" ")
    return [{"cmdline": cmd, "parser": parser.parse_set_position_light_info}]
